package com.zcoj.service.impl;

import com.zcoj.mapper.FilingMapper;
import com.zcoj.pojo.Dto.Filing;
import com.zcoj.service.FilingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author chenbin
 * @version 1.0
 * @description: TODO
 * @date 2023/5/22 18:57
 */
@Service
public class FilingServiceImpl implements FilingService {

    /**
     * @method: []
     * @param:
     * @returns:
     * @description: 全局维护一个变量对象
     * @author: chen.bin
     * @version: 1.0.0
     * @date 2023/5/22 19:04
     **/
    @Autowired
    private FilingMapper filingMapper;
    @Override
    public Integer updateFiling(Filing filing) {
        return filingMapper.updateById(filing);
    }

    /**
     * @method: [searchFilingNumber]
     * @param: []
     * @returns: java.lang.String
     * @description: 默认返回id为1的信息
     * @author: chen.bin
     * @version: 1.0.0
     * @date 2023/5/22 19:03
     **/
    @Override
    public String searchFilingNumber() {
        Filing filing = filingMapper.selectById(1);
        return filing.getFilingNumber();
    }

    @Override
    public Filing findOneFiling() {
        Filing filing = filingMapper.selectById(1);
        return filing;
    }
}
